
#include <iostream>

class singleton{
public:
        static singleton& instance(){
                static singleton inst;
                return inst;
        }
        void hello(){
                std::cout << "Hello!" << std::endl;
        }
private:
        singleton(){}
        singleton(const singleton&);
        singleton& operator=(const singleton&);
        ~singleton(){ std::cout << "Bye!" << std::endl; }
};



int main(){
        singleton::instance().hello();
}
        
